/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.com.sixboy.dao.base;

import cn.com.sixboy.dao.QueryConditionEntity;
import java.util.List;

/**
 * @author Sam.Zheng <zcl1866@sina.com>
 * @date 2013-4-25 16:30:09
 * @version <v0.1>
 * @copyright SixBoy
 */
public interface BaseDAO<T> {
	public boolean addEntity(T entity);

	public boolean deleteEntity(T entity);

	public boolean updateEntity(T entity);

	public T querySingleEntity(String jpql);

	public List queryEntities(String jpql);

	public T querySingleEntity(Class c, int primaryKey);

	public List queryEntitiesByOneParam(String jpql, String param, Object value);

	public T queryEntityByOneParam(String jpql, String param, String value);

	public List queryEntitiesByNativeSQL(String nativeSql, Class<?> type);

	public List<T> queryAllEntity(String jpql, boolean isNameQuery);

	public boolean removeBetchEntity(List<T> entities);

	public boolean updateBatchEntity(List<T> objects);

	public List<T> queryEntities(QueryConditionEntity qce, boolean isNameQuery);
        
        public void clear();
}
